package com.zxc.csms.action;

import javax.naming.NamingException;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.zxc.csms.service.SystemServiceRemote;
import com.zxc.csms.util.EJBFactory;

@Controller
@RequestMapping("/system")
public class SystemController {

	/**
	 * 登陆页面
	 * 
	 * @return
	 * @throws NamingException
	 */
	@RequestMapping(value = "/login", method = RequestMethod.GET)
	public ModelAndView login() throws NamingException {
		SystemServiceRemote systemService = EJBFactory.<SystemServiceRemote>getRemoteStatelessBean("", "ZSystem", "",
				"SystemService", "com.zxc.csms.service.SystemServiceRemote");
		System.out.println(systemService.checkLogin("1", "1"));
		return new ModelAndView("system.login");
	}
}
